#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct tt 
{
	char a;
	void *private_data;
};

struct wd
{
	char a;
	int b;
	int c;
	struct tt t;
};

int test(struct tt *ts)
{
//	struct tt *t;
	struct wd *w;
	char *p;
	
	ts->a = 'a';
	ts->private_data = "wiaozhi_1234567890";
	
	//w = (struct wd *)t->private_data;
	w = ts->private_data;
	p = ts->private_data;
	
	//							wiao   zhi_ 1234  567890
	//							w      z    1     5      wiaozhi_1234567890
	printf("%c %c %c %c %s\n", w->a, w->b, w->c, w->t.a, p);
	
	return 0;
}


typedef struct 
{
	char *key;
	char *value;
}T1;

typedef struct
{
	long type;
	char *value;
}T3;

T1 a[] = {
			{
				"",
				((char *)&((T3) {1, (char *) 1}))
			}
		};
		
int T()
{
	T3 *pt3 = (T3*)a[0].value;
	int value;
	char *b = "xiaozhi";
	char c[] = {'a', 'b', 'c', 'd', 'e', 'f'};
	
	value = sizeof(a);
	printf("T() : %d %d %d %d sizeof c=%d strlen c=%d\n", 
					 value, sizeof(long),
					 sizeof(b), strlen(b), 
					 sizeof(c), strlen(c));	//  8 4 4 7 sizeof c=6 strlen c=7

	return (int)pt3->value;
}


struct 
{
	int x;
	struct 
	{
		int y, z;
	}nested;
} ix = { .nested.y = 5, 6, .x = 1, 2};


int main()
{
	struct tt t;
	struct wd w;
	int value;
	
	test(&t);
	 T();

	
	return 0;
}


